To show extreme disrespect or contempt for someone who has died, often by criticizing or insulting their memory or legacy. The phrase can be used literally (to actually spit on a grave) or figuratively (to speak or act in a way that dishonors the deceased).